<template>
  <div class="pop-pu2">
    <el-dialog title="拖拽" :visible="dialogVisible" :before-close="handleClose" v-draggable :modal="false">
      <el-input v-model="label" />
      <el-select v-model="value" placeholder="请选择">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
        </el-option>
      </el-select>
      <slot></slot>
      <span slot="footer" class="dialog-footer">
        <!-- <el-button @click="dialogVisible = false">关闭</el-button> -->
      </span>
    </el-dialog>
  </div>
</template>

<script>
import draggable from './draggable.js';

export default {
  directives: {
    draggable,
  },

  props: {

  },
  data() {
    return {
      dialogVisible: true,
      options: [{
        value: '选项1',
        label: '黄金糕'
      },
      {
        value: '选项2',
        label: '蟹黄'
      }],
      value: '',
      label: "222"
    };
  },
  methods: {
    handleClose(done) {
      this.dialogVisible = false; // 关闭对话框
      // this.$emit("closeDialog", this.inputData);
      done(); // 执行关闭操作
    },
  },
};
</script>


<style>
.pop-pu2 .el-dialog__wrapper {
  height: 500px;
  width: 700px;
}

</style>